/**产品库存管理-产品库-包邮商品API**/
import obj from '@/utils/request'
let {request,baseURL} = obj

//查询所有的零售预购单
export function getPurchase(params) {
  return request({
    url: '/purchase',
    method: 'get',
    params
  })
}
//查询单个的零售预购单
export function getPurchaseById(id) {
  return request({
    url: '/purchase/'+id,
    method: 'get',
  })
}
//添加零售预购单
export function addPurchase(data) {
  return request({
    url: '/purchase',
    method: 'post',
    data
  })
}
//修改零售预购单
export function modPurchase(data) {
  return request({
    url: '/purchase',
    method: 'put',
    data
  })
}
//删除零售预购单
export function delPurchase(ids) {
  return request({
    url: '/purchase',
    method: 'delete',
    data:ids
  })
}
//用于创建采购单时显示所有的货物
export function getAllGoods() {
  return request({
    url: '/purchase/allGoods',
    method: 'get',
  })
}
//根据仓库生成对应的零售采购单编码
export function getOrderCode() {
  return request({
    url: '/purchase/orderCode',
    method: 'get',
  })
}



